/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

/**
 * 微快递寄件黑名单
 *  */
import React, { useState } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import { Button, message } from 'antd';
import { wkdOrderFailPush } from '@/services/mini/wkdOrderFailPush';

const NoticeVerify: React.FC = () => {
  const [loading, setLoading] = useState<boolean>(false);

  const handlePush = () => {
    setLoading(true);
    wkdOrderFailPush().then(({ msg }: any) => {
      message.info(msg);
    });
    setTimeout(() => {
      setLoading(false);
    }, 3000);
  };

  return (
    <PageContainer title='微快递失败订单重推'>
      <Button type='primary' loading={loading} onClick={handlePush}>
        失败重推
      </Button>
    </PageContainer>
  );
};

export default NoticeVerify;
